<div class="am-u-sm-12 am-u-md-3">
    <div class="am-form-group">
        <!-- <div class="am-btn-group am-btn-group-xs">
            <a class="j-add am-btn am-btn-default am-btn-success" href="/<{$routeUrl}>/add?tab=<{$tab}>">
                <span class="am-icon-plus"></span> 新增
            </a>
        </div> -->

        <div class="am-btn-group am-btn-group-xs">
            <a class="j-add am-btn am-btn-default am-btn-success"
                href="javascript:void(0);">
                <span class="am-icon-plus"></span> 新增
            </a>
        </div>
    </div>
</div>


<script>

    $(function () {

        /**
         * 增加
         */
        $('.j-add').click(function () {
            var data = $(this).data();
            layer.open({
                type: 2,
                title: '添加<{$tit}>',
                shadeClose: true,
                shade: 0.6,
                area: ['840px', '600px'],
                content: '/<{$routeUrl}>/add?tab=<{$tab}>',
                success: function(layero, index){

                },
                yes : function(layero,index) {
                    layer.close(index);
                }
            });
        });

        /**
         * 增加
         */
        $('.j-edit').click(function () {
            var data = $(this).data();
            layer.open({
                type: 2,
                title: '添加<{$tit}>',
                shadeClose: true,
                shade: 0.6,
                area: ['840px', '600px'],
                content: '/<{$routeUrl}>/edit?id='+data.id,
                success: function(layero, index){

                },
                yes : function(layero,index) {
                    layer.close(index);
                }
            });
        });

    });

</script>